import websockets
import asyncio
from socket import *
import threading

# address = '0.0.0.0'
address = '8.135.42.100'
port = 50001
buffsize = 1024
sock = socket(AF_INET, SOCK_STREAM)
sock.connect((address, port))


def send_msg():
    while True:
        _text = input("please enter your context: ")
        sock.send((_text+'\r\n').encode('utf-8'))
        recv_text = sock.recv(buffsize)
        print(f"{recv_text}")


if __name__ == '__main__':
    send_msg()
